package org.makcro.sms.services.chat.web.client.widgets.main;

import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.extjs.gxt.ui.client.widget.menu.MenuBar;

/**
 * Chat app top panel. Contains main application menu
 * @author makcro
 *
 */
public class TopPanel extends ContentPanel {
	// aplications main menu
	private MainMenuBar mbarMainMenu;
	
	public TopPanel() {
		setHeading("SMS Chat aplikacija");
		setLayout(new FitLayout());
		add(getMbarMainMenu());
		setBorders( false );
	}
	
	private MenuBar getMbarMainMenu() {
		if (mbarMainMenu == null) {
			this.mbarMainMenu = new MainMenuBar();
		}
		return mbarMainMenu;
	}
	
}
